/**
 * 用于加载 单位树形下拉菜单 的数据
 * @param nowSelectId
 * @param url
 * chenliang
 */
function unitInfoComboTree(nowSelectId, url) {
	$(nowSelectId)
			.combotree(
					{
						url : url,
						panelHeight : '120',
						editable : 'true',
						// valueField:'code',
						// textField:'name',
						keyHandler : {
							query : function(q) {// 需要扩展才能实现：easyui 树形选择框
													// 根据输入筛选
								var t = $(this).combotree('tree');
								var nodes = t.tree('getChildren');
								for ( var i = 0; i < nodes.length; i++) {
									var node = nodes[i];
									// alert(node.pyFirst);
									if (node.text.indexOf(q) >= 0
											|| node.pyFirst.indexOf(q) >= 0
											|| node.pyFirst.indexOf(q
													.toLowerCase()) >= 0
											|| node.pyFull.indexOf(q) >= 0
											|| node.pyFull.indexOf(q
													.toLowerCase()) >= 0) {
										$(node.target).show();
									} else {
										$(node.target).hide();
									}
								}
								var opts = $(this).combotree('options');
								if (!opts.hasSetEvents) {
									opts.hasSetEvents = true;
									var onShowPanel = opts.onShowPanel;
									opts.onShowPanel = function() {
										var nodes = t.tree('getChildren');
										for ( var i = 0; i < nodes.length; i++) {
											$(nodes[i].target).show();
										}
										onShowPanel.call(this);
									};
									$(this).combo('options').onShowPanel = opts.onShowPanel;
								}
							}
						},
						onSelect : function(rec) {
						}
					});
}